package com.example.user.web.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.example.user.api.dto.User;
import com.example.user.api.service.UserClient;

@RestController
public class UserController {
    
	@Autowired
	private UserClient userClient;
 
    @GetMapping("/get/{userId}")
    public User getUserById(@PathVariable("userId") long userId) {
        return userClient.getUserById(userId);
    }
}
